//
//  ShopcartHomeTableViewCell.h
//  B2C
//
//  Created by 李小龙 on 2017/8/8.
//  Copyright © 2017年 lixiaolong. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ShopcartModel.h"
#import "IndexPathTextField.h"

typedef NS_ENUM(NSUInteger, EditType) {
    EditTypeSub,
    EditTypeAdd,
    EditTypeSpecs,
    EditTypeDelete,
    EditTypeSelect,
    EditTypeTextField,
};

typedef void(^EditButtonClick)(EditType type);

@interface ShopcartHomeTableViewCell : UITableViewCell

@property (weak, nonatomic) IBOutlet UIButton *selectButton;
@property (weak, nonatomic) IBOutlet UIImageView *goodsImageView;

@property (weak, nonatomic) IBOutlet UIView *normalView;
@property (weak, nonatomic) IBOutlet UILabel *normalNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *normalSpecsLabel;
@property (weak, nonatomic) IBOutlet UILabel *normalCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *normalPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *normalOldPriceLabel;

@property (weak, nonatomic) IBOutlet UIView *editView;
@property (weak, nonatomic) IBOutlet UILabel *editNameLabel;
@property (weak, nonatomic) IBOutlet UIButton *editSubButton;
@property (weak, nonatomic) IBOutlet IndexPathTextField *editCountTextField;
@property (weak, nonatomic) IBOutlet UIButton *editAddButton;
@property (weak, nonatomic) IBOutlet UILabel *editSpecsLabel;

@property (weak, nonatomic) IBOutlet UIView *lineView;

@property (nonatomic, assign) NSInteger maxCount;
@property (nonatomic, copy) EditButtonClick editBlock;

- (void)updateCellWithModel:(ShopcartModel *)model;

@end
